package shortestpath.bellmanford.graph;

import shortestpath.Node;
import shortestpath.Node.AbstractNodeImpl;

public class Field extends AbstractNodeImpl implements Node {

	final int penalty;
	final int x;
	final int y;

	public Field(String name, int penalty, int x, int y) {
		super(name);
		this.penalty = penalty;
		this.x = x;
		this.y = y;
	}

	public int getPenalty() {
		return penalty;
	}

	public int getX() {
		return x;
	}

	public int getY() {
		return y;
	}

	@Override
	public String toString() {
		return "Field[" + this.x + "|" + this.y + "(" + this.penalty + ")]";
	}

}
